package src.main.java.org.File;

import java.io.File;

public class Test1 {
    public static void main(String[] args) {
        //1.创建一个File对象，指代某个具体的文件
//        File file = new File("E:\\a.txt");
//        File file = new File("E:/a.txt");
        File file = new File("E:"+File.separator+"a.txt");
        System.out.println(file.length());
        //2.指代某个文件夹
        File file1 = new File("E:/resource");
        System.out.println(file1.length());
        System.out.println(file1.exists());
        //要定位的文件在模块中,使用相对路径
        File file2 = new File("./a.txt");
    }
}
